package com.example.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Created by IntelliJ IDEA2021.3
 * @Author: Tenghw
 * @Date: 2022/03/19  15:30
 * @Description:
 */
@Slf4j
@Controller
@RequestMapping(path = "/hello")
@CrossOrigin(maxAge = 3600,methods = RequestMethod.POST)
public class EurekaController {

    @RequestMapping(path = "/security")
    @ResponseBody
    public String mylogin(HttpServletResponse httpResponse, HttpServletRequest httpServletRequest ){
        log.info("=====mylogin=====");
        return "hello security...";
    }
}
